<template>
    <div>
      <h5 v-for="(val,key) in prods" :key="key" @click="jump(val)">
        {{key}}
      </h5>
    </div>
</template>

<script>
export default {
  name: 'a1',
  data() {
    return {
      prods: [],
    };
  },
  methods: {
    jump(val) {
      this.$router.replace('/a3');
      // this.$router.push({ path: '/a2/a4', query: { pid: val.pid } });
      // this.$router.push({ name: 'a4', params: { pid: val } });
    },
  },
  created() {
    this.$http.getData()
      .then((res) => {
        this.prods = res.data.data;
      })
      .catch((err) => {
        console.log(err);
      });
  },
  mounted() {},
  props: {},
};
</script>

<style scoped lang="scss">
div{
  width: 100vw;
  height: 100vh;
  background: tomato;
  color: #fff;
  font-size: 30px;
  text-align: center;
}
</style>
